<?php
namespace app\serveruser\validate;
use \app\manage\validate\BaseValidate;
/**
 * 用户的验证类
 * @author adv30 <adv30@126.com> 2017年6月15日14:46:44
 */
class MenuCate extends BaseValidate
{
    // 是否使用true基础的验证规则
    // protected $useBaseRules = false;
    protected $rule = [
        'id' => ['integer', 'gt'=>'0'],
        'app_id' => ['integer', 'gt'=>'0'],
        'name' => ['alphaDash', 'length'=>'5,16'],
        'name_cn' => ['chs', 'length'=>'4,16'],
    ];
    protected $message = [
    ];
    protected $scene = [
        'add' => ['app_id', 'name', 'name_cn'],
        'stop' => ['id', 'name'],
        'listByApp' => ['app_id'],
        'listAllByApp' => ['app_id'],
        'list' => ['page', 'list_rows'],
        'start' => ['id', 'name'],
        'edit' => ['id', 'name', 'name_cn'],
    ];
}
